package com.own.business.system.dictionary.business.service;

import com.own.business.system.dictionary.entity.bo.SystemDictionaryItemBo;
import com.own.business.system.dictionary.entity.map.SystemDictionaryItemMapVo;
import com.own.business.system.dictionary.entity.po.SystemDictionaryItem;
import com.own.business.system.dictionary.entity.query.SystemDictionaryItemQuery;
import com.own.business.system.dictionary.entity.vo.SystemDictionaryItemVo;
import com.own.component.common.base.service.BaseService;

import java.util.List;

/**
 * SystemDictionaryItemService
 *
 * @author chenxueli
 * @date 2023-06-21 09:50:26
 */
public interface SystemDictionaryItemService extends BaseService<
        SystemDictionaryItem,
        SystemDictionaryItemBo,
        SystemDictionaryItemVo,
        SystemDictionaryItemMapVo,
        SystemDictionaryItemQuery
        > {

    /**
     * 根据数据字典类型的code查询
     *
     * @param code code值
     * @return 返回列表
     */
    List<SystemDictionaryItemMapVo> mapByDictionaryCode(String code);

    /**
     * 根据name和rootCode获取id
     *
     * @param name     名称
     * @param rootCode 根code
     * @return id
     */
    Long getIdByNameAndRootCode(String name, String rootCode);

    /**
     * 根据code获取字典信息
     *
     * @param code code
     * @return 字典信息
     */
    SystemDictionaryItemMapVo getItemByCode(String code);

}
